@import '~view-design/src/styles/index.less';
//animation
@transition-time : 0.1s;
@animation-time : 0.1s;
@animation-time-quick: 0.1s;

//color
@primary-color: #2d8eff;
@shadow-color : rgba(0, 0, 0, .15);
@shadow-down : 0 1px 3px @shadow-color; //下拉框阴影

//font
@font-size-base: 12px; //下拉单字体

//table
@table-thead-bg: #f3f4f5;

//border
@border-radius-base : var(--default-border-radius-base);
@border-radius-small : var(--default-border-radius-base);
@btn-border-radius : var(--default-border-radius-base); //下拉框圆角
@btn-border-radius-small: var(--default-border-radius-base);
@border-color-base : #eaebef; // outside
@border-color-split : #e8eaec; // inside
@border-width-base : 1px; // width of the border for a component
@border-style-base : solid;

/* iview css覆盖 */

body {
 font-family: var(--global-font-family);
}

//ivu-checkbox
.ivu-checkbox {
    .ivu-checkbox-focus {
        box-shadow: none;
    }
}

//ivu-btn
.ivu-btn {
    transition: var(--animation-hover);
    box-shadow: none !important;
    user-select: none;

    &.no-border {
        border: 0;
    }

    // &:hover {
    //     color           : var(--default-hover-font-color);
    //     background-color: var(--animation-hover-bgcolor);
    // }

    &.ivu-btn-primary /deep/ {
        &:hover {
            color: #fff;
            background-color: var(--default-hover-font-color);
        }

        i:hover {
            color: #fff;
        }
    }
}

//ivu-icon
.ivu-icon {
    transition: var(--animation-hover);


    &:hover {
        color: var(--default-hover-font-color);
    }
}

//ivu-input
.ivu-input-wrapper {

    .ivu-icon {
        color: var(--input-phcolor);
    }

    .ivu-input {
        box-shadow: none !important;
        color: var(--default-current-font-color);

        &::placeholder {
            color: var(--input-phcolor);
        }

        &[disabled] {
            cursor: default;
        }
    }
}

.ivu-input-wrapper,
.ivu-date-picker,
.ivu-select,
.ivu-time-picker {
    &.align-center {

        .ivu-input,
        .ivu-select-input {
            text-align: center;
        }
    }

    &.align-left {

        .ivu-input,
        .ivu-select-input {
            text-align: left;
        }
    }

    &.align-right {

        .ivu-input,
        .ivu-select-input {
            text-align: right;
        }
    }
}

//ivu-select
.ivu-select /deep/ {
    .ivu-select-selection {
        box-shadow: none !important;
    }

    .ivu-select-dropdown {
        overflow: auto;
    }
}

.ivu-select-dropdown {
    max-height: 300px;
}

.ivu-dropdown-transfer/deep/ {
    .dropdown-dot {
        display: inline-block;
        border-radius: 15px;
        // background-color: #e1e1e1;
        background: #ed4014;
        color: #fff;
        padding: 1px 5px;
        font-size: 10px;
        font-weight: bold;
        text-align: center;
        margin-left: 7px;
    }
}

.ivu-auto-complete.ivu-select-dropdown {
    max-height: 300px;
}

.ivu-auto-complete {
    &.ivu-select-dropdown {
        overflow: auto;
    }
}

//ivu-input-number
.ivu-input-number {
    &.ivu-input-number-focused {
        box-shadow: none !important;
    }
}

//ivu-dropdown
.ivu-dropdown /deep/ {
    cursor: pointer;

    .ivu-dropdown-item {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

//ivu-collapse
.ivu-collapse /deep/ {
    border: 0;

    .ivu-collapse-header {
        background-color: var(--collapse-header-bgcolor);
    }

    .ivu-collapse-content {
        padding: 0;
    }

    .ivu-collapse-content-box {
        padding: 0;
    }
}

//ivu-split
.ivu-split-wrapper /deep/ {
    .ivu-split-trigger-horizontal {
        height: 3px;
        background-color: var(--split-wrapper-bg-color);
        border: 0;

        .ivu-split-trigger-bar-con.horizontal {
            top: 0;
        }

        .ivu-split-trigger-bar {
            height: 3px;
        }
    }

    .ivu-split-trigger-vertical {
        width: 3px;
        background-color: var(--split-wrapper-bg-color);
        border: 0;

        .ivu-split-trigger-bar-con.vertical {
            left: 0;
        }

        .ivu-split-trigger-bar {
            width: 3px;
        }
    }
}

//主界面tabs设置
.main-panel {
    .wy-grid {
        height: calc(100% - 1px) !important;
        background-color: #fff;
    }

    .ivu-tabs {
        height: 100%;
        background-color: var(--tabs-bg-color);
        overflow: hidden;
        color: var(--tabpane-font-color);

        .ivu-tabs-bar {
            margin-bottom: 0;
            border-bottom: 0;
            box-shadow: var(--default-box-shadow-down);
            position: relative;
            z-index: 2;
            background-color: var(--tabs-bg-color);

            .ivu-tabs-nav-container {
                height: 34px;

                .ivu-tabs-nav-scroll {

                    .ivu-tabs-nav {
                        margin-left: 20px;

                        .ivu-tabs-tab {
                            margin-right: 15px;
                            border: 0;
                            padding: 8px 0px 4px;
                            height: 34px;
                            text-align: center;
                            box-shadow: none;
                            background-color: #fff;
                            transition: none;

                            &-active {
                                font-weight: bold;
                                background-color: #fff;
                                height: 34px;
                                border-bottom: 2px solid var(--tabpane-active-font-color);
                                color: var(--tabpane-active-font-color);
                            }

                            &:hover {
                                color: var(--tabpane-hover-font-color);
                            }
                        }
                    }
                }
            }
        }

        .ivu-tabs-content {
            height: calc(100% - 34px);
            // background-color: var(--main-container-bg-color);
            background-color: #e9ecf3;
            display: flex;
            position: relative;

            .ivu-tabs-tabpane {
                margin: 6px;
                border-radius: var(--default-border-radius-base);
                box-shadow: var(--default-box-shadow-down);
                width: calc(100% - 12px);
                height: calc(100% - 12px);

                &.active {
                    z-index: 103;
                }
            }
        }
    }

    .main-panel-tabs {
        >.ivu-tabs-content {
            >.ivu-tabs-tabpane {
                display: block !important;
                position: absolute;
            }
        }
    }
}

//panel的tabs设置
.wy-panel /deep/ {
    .panel-table {
        .ivu-tabs-content {
            .ivu-tabs-tabpane {
                padding: 0 18px;
            }
        }

        .ivu-tabs-bar {
            width: 50%;
        }

        .ivu-tabs-content {
            margin-top: -38px;
        }
    }

    .panel-single {
        .ivu-tabs-bar {
            display: none;
        }
    }


    .ivu-tabs {
        .ivu-tabs-bar {
            box-shadow: none;

            .ivu-tabs-nav-container {
                height: var(--tabs-nav-container-height);

                .ivu-tabs-nav-scroll {
                    .ivu-tabs-nav {
                        .ivu-tabs-tab {
                            &-active {
                                height: 34px;
                            }
                        }
                    }
                }
            }
        }

        .ivu-tabs-content {
            height: 100%;
            background-color: #fff;

            .ivu-tabs-tabpane {

                margin: 0;
                border-radius: 0;
                box-shadow: none;
                width: 100%;
                height: 100%;
                position: relative;
            }
        }
    }
}

.panel-tabs /deep/ {
    .ivu-tabs {
        background-color: transparent;

        .ivu-tabs-bar {
            background-color: transparent;
        }
    }
}

//setup的tabs设置
.setup /deep/ {
    .ivu-tabs {
        height: 100%;
        background-color: #fff;
        border-bottom: 0;

        .ivu-tabs-bar {
            margin-bottom: 0;
            border-bottom: 0;
            box-shadow: none;
            position: relative;
            z-index: 2;

            .ivu-tabs-nav-container {
                height: var(--tabs-nav-container-height);

                .ivu-tabs-nav-scroll {
                    background-color: #e7e7e8;

                    .ivu-tabs-nav {
                        margin-left: 0;

                        .ivu-tabs-tab {
                            margin-right: 0;
                            border: 0;
                            padding: 9px 15px 4px;
                            height: var(--tabs-nav-container-height);
                            text-align: center;
                            box-shadow: none;
                            background-color: transparent;

                            &-active {
                                background-color: #fff;
                                font-weight: bold;
                                height: var(--tabs-nav-container-height);
                            }
                        }
                    }
                }
            }
        }

        .ivu-tabs-content {
            height: 100%;

            .ivu-tabs-tabpane {
                margin: 0;
                border-radius: 0;
                box-shadow: none;
                width: 100%;
                height: 100%;
                background-color: #fff;
            }
        }
    }
}

//basetab的tabs设置
.basetab {
    display: flex;
    flex-direction: column;

    &.ivu-tabs {
        height: 100%;
        background-color: #fff;


        .ivu-tabs-bar {
            flex-shrink: 0;
            margin-bottom: 0;
            border-bottom: 0;
            box-shadow: none;
            position: relative;
            z-index: 2;

            .ivu-tabs-nav-container {
                height: var(--tabs-nav-container-height);

                .ivu-tabs-nav-scroll {
                    background-color: var(--theme-row-bgcolor);

                    .ivu-tabs-nav {
                        margin-left: 0;

                        .ivu-tabs-tab {
                            margin-right: 0;
                            border: 0;
                            padding: 9px 15px 4px;
                            background-color: transparent;
                            height: var(--tabs-nav-container-height);
                            text-align: center;
                            box-shadow: none;

                            &-active {
                                background-color: #fff;
                                font-weight: bold;
                                height: var(--tabs-nav-container-height);
                            }
                        }
                    }
                }
            }
        }

        .ivu-tabs-content {
            flex: 1;

            .ivu-tabs-tabpane {
                margin: 0;
                border-radius: 0;
                box-shadow: none;
                width: 100%;
                height: 100%;
                background-color: #fff;
            }
        }
    }
}

//dropdown中tabs的配置
.dropdown /deep/ {
    .ivu-tabs {
        .ivu-tabs-bar {
            .ivu-tabs-nav-container {
                .ivu-tabs-nav-scroll {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    background-color: #fff;

                    .ivu-tabs-nav {
                        border-radius: var(--default-border-radius-base);
                        background-color: #f1f1f1;

                        .ivu-tabs-tab {
                            &:nth-child(2) {
                                border-top-left-radius: var(--default-border-radius-base);
                                border-bottom-left-radius: var(--default-border-radius-base);
                            }

                            &:last-child {
                                border-top-right-radius: var(--default-border-radius-base);
                                border-bottom-right-radius: var(--default-border-radius-base);
                            }

                            width : auto;
                            padding : 0 38px;
                            height : 34px;
                            line-height: 34px;
                            transition : transform 0s;
                            border : 0;

                            &-active {
                                background-color: var(--default-hover-font-color);
                                color: #fff;
                                font-weight: bold;
                                border-radius: var(--default-border-radius-base);
                                height: 34px;
                            }
                        }
                    }
                }
            }
        }
    }
}